/*
 *    This file is part of CeluMap.
 *
 *    CeluMap is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU Lesser General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    CeluMap is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU Lesser General Public License for more details.
 *
 *    You should have received a copy of the GNU Lesser General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *    Copyright 2006, 2007, 2008 Gonzalo Merayo
 *    gonzalo (at) celumap.com.ar
 *    www.celumap.com.ar
 *
 */

package applet;

import java.applet.Applet;

import javax.swing.BoxLayout;

import file.ResourceGetter;

import map.file.CachedFileMap;

import panel.MapPanel;

public class CeluMapApplet extends Applet {

	MapPanel mapPanel = null;
	
	@Override
	public void init() {
		super.init();
		setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		CachedFileMap m = new CachedFileMap(ResourceGetter.getInstance(), "bsas.map", null);
		getMapPanel().setMap(m);
		add(getMapPanel());
	}

	private MapPanel getMapPanel(){
		if(mapPanel==null){
			mapPanel = new MapPanel();
			mapPanel.init();
		}
		return mapPanel;
	}
	
	private static final long serialVersionUID = 5008391770143740909L;


}
